@isTest
private class fvaCtlr_Tests {

    public static testMethod void testMyController() 
    {
        PageReference pageRef = Page.fva;
        Test.setCurrentPage(pageRef);
        fva_ctlr controller = new fva_ctlr();
        
        List<SelectOption> TestOptions = new List<SelectOption>();
        
        TestOptions = controller.getCountries();
        TestOptions = controller.getCountriesList();
        TestOptions = controller.getFVAVisitingCountry();
        TestOptions = controller.getCompanies();
        TestOptions = controller.getJobTitles();
        TestOptions = controller.getQualifications();
        TestOptions = controller.getGenders();
        TestOptions = controller.getTitles();
        TestOptions = controller.getMaritalStatuses();
        TestOptions = controller.getReligions();
        
        
        
        PageReference Pg;
        Pg = controller.ResetApplication();
        Pg = controller.ToMainMenu();
        Pg = controller.CreateApplication();
        
        controller.Application.Visa_Number__c = '5756456458';
        controller.visaIssueDate = String.ValueOf(Date.TODAY());
        
        controller.Application.Title__c = 'Mr';
        controller.Application.First_Name__c = 'Cloud';
        controller.Application.Middle_Name__c = 'S';
        controller.Application.Last_Name__c = 'Concept';
        Country__c Countries = [SELECT id, Name FROM Country__c LIMIT 1];
        controller.Application.Currently_Nationality__c = Countries.id;
        controller.Application.Previous_Nationality__c = Countries.id;
        controller.dateOfBirth = String.ValueOf(Date.TODAY());
        CountriesList__c CountriesList = [SELECT id, Name FROM CountriesList__c LIMIT 1];
        controller.Application.Country_of_Birth__c = CountriesList.id;
        controller.Application.City_of_Birth__c = 'SomePlace';
        
        controller.Application.Passport_Number__c = '2345678AS';
        controller.passportIssueDate = String.ValueOf(Date.TODAY());
        controller.passportExpiryDate = String.ValueOf(Date.TODAY());
        controller.Application.Passport_Country_of_Issue__c = CountriesList.id;
        controller.Application.Passport_City_of_Issue__c = 'SOMECITY';        
        controller.Application.Mother_Full_Name__c = 'SOMENAME';
        controller.Application.Marital_Status__c = 'Single';
        controller.Application.Religion__c = 'Muslim';
        Occupation__c OCP = [Select id, name FROM Occupation__c LIMIT 1];
        controller.Application.Job_Title_Position__c = OCP.id;
        Qualification__c QualificationsList = [SELECT id, Name FROM Qualification__c LIMIT 1];
        controller.Application.Education_Qualification__c = QualificationsList.id;
        controller.Application.Gender__c = 'Male';
        
        Account acc = [SELECT id, name FROM Account LIMIT 1];
        controller.Application.Company_Name__c = acc.id;
        controller.Application.Name_of_Authorized_Signatory__c = 'SOMEONE';
        controller.companyDate = String.ValueOf(Date.TODAY());
        
        controller.Application.FVA_Visiting_Country__c = CountriesList.id ;
        controller.expectedDateOfArrival = String.ValueOf(Date.TODAY());
        controller.Application.FVA_Duration_of_Visit__c = '3 Days' ;
        controller.Application.FVA_Purpose_of_Visit__c = 'Business' ;
        
        
        Pg = controller.CreateApplication();
    }
}